package ufpb.compiladores.sintatico;

/**
 *
 * @author SemiNick
 */
public class Entity {

    public static enum EntityType {
        
         TOKEN,
         TYPE,
         PRODUCTION,
         VOID
    }
    
    private final EntityType et;
    private final String value;
    
    public Entity(EntityType et, String value) {
        
        if (value == null) {
            
            throw new NullPointerException("Value cannot be null");
        }
        
        this.et = et;
        this.value = value;
    }
    
    public final EntityType getType() {
        
        return this.et;
    }
    
    public final String value() {
        
        return this.value;
    }
}
